/**
 * @author gao
 * @date 2025/6/21 17:01
 */

public class MyThread extends Thread {
    @Override
    public void run() {
        while (true) {
            System.out.println("Hello Thread!");
            try {
                // 休眠1秒
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                // 抛出运行时异常
                throw new RuntimeException(e);
            }
        }
    }
}